package com.gsm.utils;

import cn.hutool.json.JSONUtil;
import com.gsm.entity.RespCode;
import com.gsm.entity.Result;
import org.springframework.stereotype.Component;

@Component
public class JsonUtils {

    /**
     * 对象转JSON
     * @param obj
     * @return
     */
    public static String obj2Json(Object obj){
        String jsonStr = JSONUtil.toJsonStr(obj);
        return jsonStr;
    }
}
